home *** CD-ROM | disk | FTP | other *** search
-
-
-
- uname(2) UNIX Programmer's Manual uname(2)
-
-
- NAME
- uname - Gets the name of the current system
-
- SYNOPSIS
- #include <sys/utsname.h>
-
- int
- uname (struct utsname *name);
-
- PARAMETERS
- Points to a utsname structure.
-
- DESCRIPTION
- The uname() function stores information identifying the
- current system in the structure pointed to by the name
- parameter.
-
- The uname() function uses the utsname structure, which is
- defined in the sys/utsname.h file and contains the follow-
- ing members:
- char sysname[__SYS_NMLN];
- char nodename[__SYS_NMLN];
- char release[__SYS_NMLN];
- char version[__SYS_NMLN];
- char machine[__SYS_NMLN];
-
- The uname() function returns a null-terminated character
- string naming the current system in the sysname character
- array. The nodename array contains the name that the sys-
- tem is known by on a communications network. The release
- and version arrays further identify the system. The
- machine array identifies the CPU hardware being used.
-
- RETURN VALUES
- Upon successful completion, a nonnegative value is
- returned. Otherwise, -1 is returned and errno is set to
- indicate the error.
-
- ERRORS
- If the uname() function fails, errno may be set to the
- following value:
-
- [EFAULT] The name parameter points outside of the process
- address space.
-
- RELATED INFORMATION
-
- Commands: uname(1)
-